#define _CRT_SECURE_NO_WARNINGS

#include"Animal.h"
#include"Cat.h"
#include"Dog.h"


void tempFunc(Animal A) {
	cout <<"default:\t" << A.skinColor << endl;
}

void tempFunc_ref(Animal& refA) {
	refA.skinColor = (refA.skinColor + "(ref)");
	cout <<"ref:\t" << refA.skinColor << endl;
}

void tempFunc_p(Animal* pA) {
	pA->skinColor = (pA->skinColor + "(p)");
	cout << "p:\t" << pA->skinColor << endl;

}


int main() {
	Cat cat1;
	Animal cat2(cat1);
	Animal* p1 = new Cat;
	Animal* p2 = new Dog;
	cout << "Cat isA Animal:" << cat1.skinColor << endl;////对比1和2
	cout << "Cat isA Animal:" << p1->skinColor << endl;////使用指针好像能够避免隐藏这一特性？
	cout << "=====================================" << endl;
	cout << "=====================================" << endl;
	tempFunc(cat2);
	tempFunc_ref(* p1);
	tempFunc_p(p2);

	return 0;
}